package com.sky.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Update;

public interface ShoppingCartMapper {
    @Update("update shopping_cart set number = #{number} where id = #{id}")
    void update(shoppingCart cart);

    /**
     * 清空购物车
     * @param userId
     */
    @Delete("Delete from shopping_cart where user_id=#{userId}")
    void delete(Long userId);
}
